package com.example.config;

import com.example.interceptor.LoginInterExecption;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description //TODO
 * @Date 2022/9/19 22:56
 * @Author lonng
 **/
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Autowired
    LoginInterExecption loginInterExecption;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterExecption).addPathPatterns("/doProblem/evaluating").addPathPatterns("/interview/add").addPathPatterns("/doProblem/run");
    }
}
